/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package canteen.sys.model.entity;

import java.io.Serializable;
import java.sql.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;

/**
 *
 * @author TNT
 */
@Entity
public class Feedback implements Serializable {

    @Id
    @GeneratedValue
    private int feedbackId;
    @NotNull
    @Column(length = 100, nullable = false)
    private String title;
    @NotNull
    @Column(length = 500, nullable = false)
    private String content;
    @Column(length = 500)
    private String answer;
    @NotNull
    @ManyToOne
    @JoinColumn(name = "lId")
    private LoginMaster loginMaster;
    @NotNull
    private Date createDate;
    private boolean status;

    public Feedback(int feedbackId, String title, String content,String answer, LoginMaster loginMaster, Date createDate, boolean status) {
        this.feedbackId = feedbackId;
        this.title = title;
        this.content = content;
        this.answer = answer;
        this.loginMaster = loginMaster;
        this.createDate = createDate;
        this.status = status;
    }

    public Feedback(String title, String content,String answer, LoginMaster loginMaster, Date createDate, boolean status) {
        this.title = title;
        this.content = content;
        this.answer = answer;
        this.loginMaster = loginMaster;
        this.createDate = createDate;
        this.status = status;
    }

    public Feedback() {
    }

    public int getFeedbackId() {
        return feedbackId;
    }

    public void setFeedbackId(int feedbackId) {
        this.feedbackId = feedbackId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public LoginMaster getLoginMaster() {
        return loginMaster;
    }

    public void setLoginMaster(LoginMaster loginMaster) {
        this.loginMaster = loginMaster;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }
}
